-
Notifications
You must be signed in to change notification settings - Fork 490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
model: support database placement option and partition placement option #1342
model: support database placement option and partition placement option #1342
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
model/ddl.go
Outdated
@@ -84,6 +84,7 @@ const ( | |||
ActionCreatePlacementPolicy ActionType = 51 | |||
ActionAlterPlacementPolicy ActionType = 52 | |||
ActionDropPlacementPolicy ActionType = 53 | |||
ActionAlterTablePartitionOptions ActionType = 54 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a smaller name. We will transform ast.TableOption
into different actions, refer https://github.com/pingcap/tidb/blob/257140a154a13061b55993f499aa25f0cd07cdf6/ddl/ddl_api.go#L2530-L2573. We don't really have AlterTableOption
type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a smaller name. We will transform
ast.TableOption
into different actions, refer https://github.com/pingcap/tidb/blob/257140a154a13061b55993f499aa25f0cd07cdf6/ddl/ddl_api.go#L2530-L2573. We don't really haveAlterTableOption
type.
the constant is used for ddl.runDDLJob() to mark job type not ddl.AlterTable()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that is what I mean. If we are going to support partition option, it is likely we don't have AlterTablePartition
action. Instead, we may have AlterTablePolicy
or RebaseTable
.
It is kind of hard to support all table options in one ddl job. We usually process the option one by one with different jobs.
I just merged #1340 so the model now has both |
/cc @AilinKid |
…n_' into support_database_placement_option_
4b866ff
to
b06127c
Compare
…n_' into support_database_placement_option_
What problem does this PR solve?
support database placement option and partition placement option
What is changed and how it works?
Check List
Tests
Code changes
Side effects
Related changes